import java.util.Arrays;

public class Bear extends Animal{

	Leg[] leg ;
	Eye eye;
	Tail tail;

	public Bear(String name, Leg[] leg, Eye eye, Tail tail) {
		super.name = name;
		this.leg=leg;
		this.eye=eye;
		this.tail=tail;
	}

	public void watch(Animal animal) {
		eye.watch(animal);
	}

	public void legMove(Animal animal) {
		for(Leg legs: leg){
			legs.legMove(animal);
		}
	}

	@Override
	public String toString() {
		return "bear{" +
				"leg=" + Arrays.toString(leg) +
				", eye=" + eye +
				", tail=" + tail +
				'}';
	}
}
